home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / database / convr704.zip / CONVERT.DOC < prev    next >
Text File  |  1997-04-28  |  30KB  |  642 lines

  1. CONVERT.DOC                            1                           Apr 28, 1997
  2.  
  3. The CONVERT.EXE program converts  data  between  several  basic  data  formats.
  4. Features:
  5.  
  6.   * You can read data in from any of the following data formats:
  7.        ASCII-delimited
  8.        fixed field
  9.        dBase-compatible
  10.   * You can write data out in any of the following data formats:
  11.        ASCII-delimited
  12.        fixed field
  13.        dBase-compatible
  14.        WKS (Lotus 1-2-3 release 1 compatible)
  15.   * For ASCII-delimited files, you can  specify  the  delimiters  used  between
  16.     fields as well as around numeric or character data.
  17.   * For dBase input files, you can retain deleted records if you want.
  18.   * You can resize variables or drop them entirely if desired.
  19.   * You can add fields as desired and assign initial values to them.
  20.   * You can specify up to 10 include filters; all records processed  must  meet
  21.     at least one of these filter conditions.
  22.   * You can specify up to 10 exclude filters;  any  records  which  meet  these
  23.     filter conditions are dropped.
  24.   * For WKS output files, you can process input files bigger than  Lotus  1-2-3
  25.     itself can handle (1-2-3 limits input records to being  240  characters  or
  26.     less).
  27.   * Cell filters can be created, ignoring, say, any record where the  value  in
  28.     cell 4 is less than 10.
  29.   * The program can only  handle  files  with  255  fields  or  fewer.   (Those
  30.     obsessed with handling more fields can ask for a version that does so.)
  31.   * Handles DOS text files (lines end with CR/LF), Mac text  files  (lines  end
  32.     with CR), or Unix text files (lines end with LF).
  33.   * Pressing escape stops the program early.
  34.  
  35.  
  36.  
  37. CONVERT.DOC                            2                           Apr 28, 1997
  38.  
  39. Data format types:
  40.  
  41. An ASCII-delimited file is one which typically has double  quotes  around  each
  42. character field (the quotes are  optional  in  CONVERT)  and  typically  commas
  43. between fields.  Leading and trailing spaces are removed from character as well
  44. as all other values.
  45.  
  46. A fixed-field file places each field in  the  same  column  positions  on  each
  47. record.  The lengths of the fields are the same from record to record.
  48.  
  49. As an example, these might be an ASCII-delimited records:
  50.  
  51.         "Economic Bulletin Board","202 482-3870",35
  52.         "EBB High-Speed","202 482-2584",100
  53.  
  54. Fixed-field file records might look like this for the same data:
  55.  
  56.         Economic Bulletin Board 202 482-3870  35
  57.         EBB High-Speed          202 482-2584 100
  58.  
  59. (On files generated on a PC, most fixed-field file records  end  with  a  CR/LF
  60. combination.  Although these two characters actually add two characters to each
  61. line, most people and  programming  languages  ignore  them.   Files  generated
  62. elsewhere may not have these line terminators.  Use the /BINARY option if  this
  63. is the case.)
  64.  
  65. WKS files are supported directly by Lotus 1-2-3 (all versions) as well as  most
  66. other spreadsheet programs.  DBF files are supported  by  dBaseIII,  dBaseIII+,
  67. dBaseIV, and most other data base management programs (Paradox etc).
  68.  
  69.  
  70.  
  71. CONVERT.DOC                            3                           Apr 28, 1997
  72.  
  73. Field-definition file:
  74.  
  75. Unless you are reading a dBase file, this program requires  a  field-definition
  76. file to figure out the characteristics for each field and also to  set  certain
  77. file characteristics.  If you're processing an ASCII-delimited input file,  the
  78. routine can try to create a field-definition file for you if desired.
  79.  
  80. The  field-definition  file  can  be  created  with  any  text   editor.    The
  81. field-definition file consists of several records  with  the  following  fields
  82. separated by spaces.  Except for the record type indicator (which must begin in
  83. column 1), all other fields can be placed in any columns:
  84.  
  85.    (1) record type (see below)
  86.    (2) length of field on input
  87.    (3) number of decimal places for numeric data (if you don't know, put a  "?"
  88.        here; for non-numeric data, a "0" is fine) on output
  89.    (4) length of field on output
  90.  
  91. Any characters after the field length are treated as comment fields.  You would
  92. typically use this to enter the field name or  column  position  or  any  other
  93. information of use to you.
  94.  
  95. If you'd like, you can leave out both decimal place count *and* the  length  of
  96. the output field.  (You cannot leave off one and include the other however.) If
  97. they are left out, the number of decimal places is presumed to be "0"  and  the
  98. length of the output field is presumed to be the same  as  the  length  of  the
  99. input field.
  100.  
  101. The data record types accepted by this routine are as follows:
  102.  
  103.         type C = character data (leading spaces are trimmed)
  104.              V = verbatim character data (no leading spaces are trimmed)
  105.              N = numeric
  106.              L = logical (T or F)
  107.              D = date (in yyyymmdd format)
  108.              M = memo fields (only for dBase input files; ignored on output)
  109.  
  110. The data fields should be in the order the fields are found in the source file.
  111.  
  112. Note that for fixed field files, you have to account  for  every  byte  in  the
  113. file. If you have something like this:
  114.  
  115.         12345678_1_2345678_2_2345678_3      (column positions)
  116.         APPLE    X Y    12 BANANAS
  117.  
  118. Even though you may think you only have five fields, the  following  .DEF  file
  119. will NOT work:
  120.  
  121.         ; Bad .DEF file:  Note does not account for blank spaces
  122.         ; NOTE:  Input and output lengths are the same (mistakenly) so left
  123.         ; out number of decimal places and output length for each record.
  124.         C   8 Fruit1
  125.         C   1 Class1
  126.         C   1 Class2
  127.         N   5 Value
  128.         C  11 Fruit2
  129.  
  130.  
  131. CONVERT.DOC                            4                           Apr 28, 1997
  132.  
  133. You may want the Fruit1 field to be in columns 1 through 8 and Class1 to be  in
  134. column 10 but the routine will not know to skip  column  9  so  it  will  start
  135. reading Class1 beginning in column 9, Class2 beginning in column 10,  etc.   To
  136. drop the blank positions, you have to add dummy fields on  input  and  ask  for
  137. them to be dropped on output:
  138.  
  139.         ; Good .DEF file:  Spaces between fields are accounted for
  140.         C   8       Fruit1
  141.         C   1 0   0 Filler
  142.         C   1       Class1
  143.         C   1 0   0 Filler
  144.         C   1       Class2
  145.         C   1 0   0 Filler
  146.         N   5       Value
  147.         C   1 0   0 Filler
  148.         C  11       Fruit2
  149.  
  150. You can also use the input field length and output field lengths to either drop
  151. fields using other formats (by specifying a zero length for  the  output  field
  152. length) or for creating fields on output (by specifying a zero length  for  the
  153. input field length).  You can also use this to expand on contract a field.  For
  154. example, if Fruit1 is 8 characters long but  you  only  want  it  to  occupy  4
  155. characters on output (thus the field would be truncated),  specify  8  for  the
  156. input field length and 4 for the output field length:
  157.  
  158.         C 8 0 4 Fruit
  159.  
  160. If the output field length is wider than  the  input  field  length,  the  data
  161. values will be shifted right or left depending on the data type.   In  general,
  162. numeric fields are shifted right (so extra spaces  show  up  in  front  of  the
  163. number) and all other field types (character, logical,  or  date)  are  shifted
  164. left.
  165.  
  166. You can have the routine create the field-definition file it's using for  dBase
  167. and ASCII-delimited files.  This  is  controlled  by  the  /OUTDEF=deffile  and
  168. /-OUTDEF parameters.
  169.  
  170.  
  171. ASCII-delimited file?  Letting the program guess the fields:
  172.  
  173. Let's say you have some sort of ASCII-delimited file.  Do you have to create  a
  174. field-definition file?  Nope.  The program will try to guess the format for you
  175. if you want.
  176.  
  177. For example, let's say you have a file called MYFILE.PRN and the first  records
  178. look like this:
  179.  
  180. ACIN,970114, 1.49 , 1.5 , 1.49 , 1.495 , 2312512 , 0
  181. AGRO,970114, 1.3 , 1.4 , 1.3 , 1.4 , 68319 , 0
  182. ALPA,970114, .875 , .89 , .875 , .885 , 1805075 , 0
  183.  
  184.  
  185. CONVERT.DOC                            5                           Apr 28, 1997
  186.  
  187. Well, looking at it, you could probably guess that it has 8 fields per  record,
  188. the first of which is character and the others are probably  numeric.   So  you
  189. could create a field-definition file and go with that.  But let's see  how  the
  190. program does on its own.
  191.  
  192. Looking at the  fields,  there  are  apparently  no  special  characters  (like
  193. quotation marks) around the  character  fields.   There  are  also  no  special
  194. characters around the numeric fields.  There are, however, commas  between  the
  195. fields.
  196.  
  197. A  standard  ASCII-delimited  file  would  have  quotation  marks  around   the
  198. alphabetic fields.  Your's does not have this.  As a result, you will  have  to
  199. specify a /DELIMS= parameter.  The format for this is:
  200.  
  201.         /DELIMS=aroundstrings,aroundnums,betweenfields
  202.  
  203. In your case, there is nothing around the alphabetic fields so  "aroundstrings"
  204. is null.  There is nothing around numeric fields so "aroundnums" is null. There
  205. are commas between fields so "betweenfields" is a comma.  Thus,  your  /DELIMS=
  206. parameter is:
  207.  
  208.         /DELIMS=,,,
  209.  
  210. So convert this file to a fixed-field file without  having  already  created  a
  211. field-definition file, you would issue the following command:
  212.  
  213.         CONVERT MYFILE.PRN /FROM ASCII /TO FIXED /DELIMS=,,, /-INDEF /OUTDEF
  214.  
  215. When the program runs, it will, in this case, create a fixed-field file  called
  216. MYFILE.FIX as well a field-definition file called MYFILE.DEF.  That file  would
  217. might like this:
  218.  
  219. ; Field definition file: C:\HOME\PRECIOS.DEF
  220. ; Created by CONVERT for FROM ASCII/FROM FIXED
  221. ; Created at 13:04:30 on 01-27-1997
  222. ; Positions in far left are positions on output
  223. N  10 4  10 COL_001                       In(   1:  10) Out(   1:  10)
  224. N   6 0   6 COL_002                       In(  11:  16) Out(  11:  16)
  225. N   7 4   7 COL_003                       In(  17:  23) Out(  17:  23)
  226. N   8 4   8 COL_004                       In(  24:  31) Out(  24:  31)
  227. N   7 4   7 COL_005                       In(  32:  38) Out(  32:  38)
  228. N   8 4   8 COL_006                       In(  39:  46) Out(  39:  46)
  229. N  11 9  11 COL_007                       In(  47:  57) Out(  47:  57)
  230. N   1 0   1 COL_008                       In(  58:  58) Out(  58:  58)
  231.  
  232. You can modified this field-definition file if you'd like.  Maybe you  want  to
  233. change the number of decimal places shown or expand some columns on  output  or
  234. perhaps eliminate others.  Just edit the  field-definition  file  with  a  text
  235. editor and resave it.  Then rerun the CONVERT  command,  this  time  specifying
  236. that there *is* a field-definition file:
  237.  
  238.         CONVERT MYFILE.PRN /FROM ASCII /TO FIXED /DELIMS=,,,
  239.  
  240.  
  241.  
  242. CONVERT.DOC                            6                           Apr 28, 1997
  243.  
  244. Filters:
  245.  
  246. CONVERT supports two types of filters; record filters and cell (field) filters.
  247.  
  248. Record filters:
  249.  
  250.   In general, record filters  apply  to  the  record  as  a  whole.   They  are
  251.   specified as unique types of records in the field-definition file.
  252.  
  253.   You may specify up to 10 include record filters and up to 10  exclude  record
  254.   filters in the field-definition file.
  255.  
  256.   If an include record filter is specified, the input record  must  contain  at
  257.   least one of the specified character strings in order to be processed.  If an
  258.   exclude record filter is specified, any input record which  contains  any  of
  259.   the specified character strings will be ignored.   Record  filters  are  case
  260.   sensitive (capitalization matters) and processed as "or" items (if any filter
  261.   is met, the condition is met; record filters are not  combined  to  determine
  262.   fulfillment). Record filters are specified in the  field-definition  file  in
  263.   the following ways:
  264.  
  265.          /+=string  include filter, the string "string" can appear anywhere
  266.          /S+=string include filter, the string "string" is at the beginning  of
  267.                     the record
  268.          /+S=string include filter, the string "string" is at the  end  of  the
  269.                     record
  270.          /-=string  exclude filter, the string "string" can appear anywhere
  271.          /S-=string exclude filter, the string "string" is at the beginning  of
  272.                     the record
  273.          /-S=string exclude filter, the string "string" is at the  end  of  the
  274.                     record
  275.  
  276.   For example, if you want to specify in your control file that you  only  want
  277.   records that contain either "Japan" or "France" *and* you want to exclude any
  278.   records that begin with an underscore character, you would  need  to  include
  279.   the following three filter statements:
  280.  
  281.         /+=Japan
  282.         /+=France
  283.         /S-=_
  284.  
  285.   The character string can include hexadecimal codes (in the  &Hxx  format)  or
  286.   decimal codes (in the \ddd format) if necessary.  See BRUCEHEX.DOC file.
  287.  
  288.  
  289. CONVERT.DOC                            7                           Apr 28, 1997
  290.  
  291. Cell filters:
  292.  
  293.   Cell filters are applied to individual cells (or fields) in the data.  If any
  294.   cell fails the  test  for  that  cell,  the  entire  record  is  skipped  for
  295.   additional processing.
  296.  
  297.   Each variable in  the  field-definition  file  can  include  a  cell  filter.
  298.   Filters are specified on the field type records as the last parameters on the
  299.   record and are immediately preceded with "||" indicators:
  300.  
  301.         N 8 Weight || > 100
  302.         N 4 Height || <= 6
  303.         C 10 Name || = Banana
  304.  
  305.   Cell filters can be specified as any one of six relations:
  306.  
  307.      "="  is equal to
  308.      "<"  is less than
  309.      ">"  is greater than
  310.      "<=" is less than or equal to
  311.      ">=" is greater than or equal to
  312.      "<>" is not equal to
  313.  
  314.   You cannot specify ranges.  The item to the right of the relation is  treated
  315.   as a string if the field is non-numeric, otherwise, it's treated as a number.
  316.   Do not include quotes around the strings unless you want that as part of  the
  317.   condition.  The value can include hexadecimal codes (in the &Hxx  format)  or
  318.   decimal codes (in the \ddd format) if necessary (see BRUCEHEX.DOC file).   It
  319.   can also contain spaces.  The cell filter is case  sensitive  (capitalization
  320.   matters).
  321.  
  322.   If the field is being created, you can  specify  an  assignment  cell  filter
  323.   (using "=") which will set the value of that cell as something.  For example:
  324.  
  325.         C      10 First Name
  326.         C  0 0  1 Middle Initial || = ?
  327.         C 10 0 20 Last Name
  328.  
  329.  
  330. Field-definition file for SimTel archives:
  331.  
  332. People    who     use     the     SimTel     archives     (ftp.coast.net     or
  333. http://www.coast.net/SimTel) may find the enclosed SIMIBM.DEF file useful.   It
  334. provides  the  field  definitions  for  the  standard  SIMIBM.IDX  file   (from
  335. subdirectory SimTel/filedocs, download simindex.zip).  The file  includes  some
  336. hints for dropping fields that don't seem to be useful as well  as  restricting
  337. the listing to just those files that have been added since a given date.
  338.  
  339.  
  340. Specifying parameters:
  341.  
  342. Parameters for this program can be set in the following ways.  The last setting
  343. encountered always wins:
  344.   - Read from an *.INI file (see BRUCEINI.DOC file),
  345.   - Through the use of an environmental variable (SET CONVERT=whatever), or
  346.   - From the command line (see "Syntax" below)
  347.  
  348.  
  349. CONVERT.DOC                            8                           Apr 28, 1997
  350.  
  351. Syntax:
  352.  
  353.     CONVERT infile [ outfile [ deffile ] ]
  354.       [ /INDEF=deffile | /-INDEF ] [ /OUTDEF=deffile | /OUTDEF | /-OUTDEF ]
  355.       [ /OVERWRITE | /-OVERWRITE | /APPEND | /OVERASK ]
  356.       [ /FROM FIXED | /FROM ASCII | /FROM DBF ] [ /DELETED ]
  357.       [ /TO FIXED | /TO ASCII | /TO WKS | /TO DBF ] [ /HEADER ]
  358.       [ /DELIMS=aroundstrings,aroundnums,betweenfields ] [ /BEEP ]
  359.       [ /INMISS=val ] [ /INMISSC=val ] [ /OUTMISS=val ] [ /OUTMISSC=val ]
  360.       [ /SKIP | /MISSING | /ABORT ] [ /FIRSTOBS=n ] [ /LASTOBS=n ] [ /-VER ]
  361.       [ /-NULLS ] [ /BINARY ] [ /SCAN=n ] [ /GAP=n ] [ /-CFILTERS ]
  362.       [ /Q | /Qn ] [ /MONO ] [ /Iinitfile | /-I ] [ /-ENV ] [ /? ] [ /?&H ]
  363.  
  364. "infile" is the file specification for the ASCII-delimited or fixed-field  file
  365. you want converted.   You  can  specify  a  drive  and  path  specification  if
  366. necessary.  This parameter is required.
  367.  
  368. "outfile" is the file specification of the file you want to  create.   You  can
  369. specify a drive  and  path  specification  if  necessary.   If  no  outfile  is
  370. provided, the routine will presume you want the output  file  called  the  same
  371. thing as the infile but you want the extension to be ".FIX" (if the output file
  372. is a fixed-field file), ".PRN" (if the  output  file  is  ASCII-delimited),  or
  373. ".WKS" (if the output file is to be in a WKS format).
  374.  
  375. "deffile" is the file specification for the input field-definition  file.   You
  376. can specify a drive and path specification if  necessary.   If  no  deffile  is
  377. specifically provided, the routine will presume it is called the same thing  as
  378. the infile but it has the extension of ".DEF".  Note that the deffile can  only
  379. be provided this way  if  you  also  specify  the  outfile  name;  the  use  of
  380. /INDEF=deffile is recommended instead.
  381.  
  382. "/INDEF=deffile" provides the name of the field-definition file to be  read  by
  383. the program.  If no deffile is specifically  provided  and  you're  using  FROM
  384. ASCII, the routine will presume the field-definition file exists and  is  named
  385. the same thing as the infile but it has the extension of ".DEF".  A deffile has
  386. to be specifically provided for FROM FIXED files if one is desired.
  387.  
  388. "/-INDEF" says there is no field-definition  file.   This  is  the  default  if
  389. you're using FROM DBF or FROM FIXED.
  390.  
  391. "/OUTDEF=deffile" provides the name of  the  output  file  that  you  want  the
  392. program to write the field-definition file to.  This is useful in  cases  where
  393. you did *not* use a field-definition file on input since it allows you  to  see
  394. and possibly modify the field-definition file for next time.
  395.  
  396. "/OUTDEF" says to create the field-definition file and  automatically  name  it
  397. for you.  The file name is the same as the infile with an extension of ".DEF".
  398.  
  399. "/-OUTDEF" says to skip the creation of the field-definition file.  This is the
  400. default for ASCII-delimited and fixed-field files.
  401.  
  402.  
  403. CONVERT.DOC                            9                           Apr 28, 1997
  404.  
  405. "/OVERWRITE" says to overwrite the output file if it exists already.
  406.  
  407. "/-OVERWRITE" says to abort if the output file exists already.
  408.  
  409. "/APPEND" says to append (add) to the output file if it exists  already.   This
  410. option is only available if you're creating  either  a  fixed-field  or  ASCII-
  411. delimited output file.
  412.  
  413. "/OVERASK" says to ask if the output file exists already.   This  is  initially
  414. the default.
  415.  
  416. "/FROM FIXED", "/FROM ASCII", and "/FROM DBF"  specifies  the  format  for  the
  417. input file.  The routine usually reads the input file and  guesses  its  format
  418. for you.  If the routine guesses incorrectly, use the /-VER  parameter  (below)
  419. to overrule it.
  420.  
  421. "/DELETED" applies to dBase input files only.   It  says  you  want  to  retain
  422. records tagged as "deleted".  Otherwise, they're dropped in the output file.
  423.  
  424. "/-DELETED" applies to dBase input files only.  It says to drop records  tagged
  425. as "deleted".  This is initially the default.
  426.  
  427. "/TO FIXED", "/TO ASCII", "/TO WKS", and "/TO DBF" tells the routine what  sort
  428. of output file you'd like to create.  The input and output file formats can  be
  429. the same if desired but you have to explicity specify an output  file  name  in
  430. that case.  Initially defaults to "/TO FIX".
  431.  
  432. "/HEADER" is used in conjunction with WKS  output  files.   If  /HEADER  is  in
  433. effect, the first row of the spreadsheet will contain the variable name for the
  434. cell as provided in your control file.  If none are provided, the  field  names
  435. will be FIELD_01 onward.  Note that the header line (if any) will  show  up  in
  436. the output counts.  Initially defaults to "/-HEADER".
  437.  
  438. "/-HEADER" writes only data to the output WKS file, instead  of  reserving  the
  439. first record for the name of the variable.  This is initially the default.
  440.  
  441. "/DELIMS=aroundstrings,aroundnums,betweenfields"  allows  you  to  specify  the
  442. delimiters (in sequence) around  string  fields,  around  numeric  fields  (any
  443. fields that isn't a character field), and between fields.  Defaults to:
  444.  
  445.         /DELIMS=",,,
  446.  
  447. (Use quotes around character strings, nothing  around  numeric  data,  and  the
  448. third comma indicates that there is a comma between  fields.)  The  replacement
  449. string can include hexadecimal codes (in the &Hxx format) or decimal codes  (in
  450. the \ddd format)  if  necessary  (see  BRUCEHEX.DOC  file)  so  either  of  the
  451. following would put a tab between fields:
  452.  
  453.         /DELIMS=",,&H09
  454.         /DELIMS=",,\009
  455.  
  456. "/BEEP" beeps when the program is finished.
  457.  
  458. "/-BEEP" reverses /BEEP.  Initially the default.
  459.  
  460.  
  461. CONVERT.DOC                            10                          Apr 28, 1997
  462.  
  463. "/INMISS=val" specifies that any numeric value that has  the  character  string
  464. representation of "val" will be considered missing.  Note that this is an exact
  465. character string comparison so /INMISS=1 will not compare to a value of "1.00".
  466. Defaults to /INMISS=NULL (which translates as spaces).
  467.  
  468. "/INMISSC=val" specifies that any character string value that has the value  of
  469. "val" will be considered missing.  Defaults to /INMISSC=NULL (which  translates
  470. as spaces).
  471.  
  472. "/OUTMISS=val"  specifies  that  any  missing  numeric  input  value  will   be
  473. translated on output as "val".  For  example,  "/OUTMISS=N.A."  would  fill  in
  474. "N.A." for each missing value.  Defaults to /OUTMISS=NULL (which translates  as
  475. spaces).
  476.  
  477. "/OUTMISSC=val" specifies that  any  missing  character  input  value  will  be
  478. translated on output as "val".  Defaults to /OUTMISSC=NULL (which translates as
  479. spaces).
  480.  
  481. "/SKIP" says to skip records with bad data values; otherwise the routine aborts
  482. when it runs into any.  /SKIP, /MISSING, and /ABORT are mutually exclusive.
  483.  
  484. "/MISSING" says to presume any missing  fields  in  an  ASCII-delimited  record
  485. should be filled in with blanks  (for  character  fields)  and  0  for  numeric
  486. fields.   Incomplete  records  are  written  out  (unlike  in  /SKIP).   /SKIP,
  487. /MISSING, and /ABORT are mutually exclusive.  Note that the program  will  only
  488. print out the first "bad" record.  There may be others that show up after  this
  489. one.
  490.  
  491. "/ABORT" says to abort when you run into bad records.  Initially  the  default.
  492. /SKIP, /MISSING, and /ABORT are mutually exclusive.
  493.  
  494. "/FIRSTOBS=n" says to start reading the data beginning with  record  number  n.
  495. Initially defaults to "/FIRSTOBS=1".
  496.  
  497. "/LASTOBS=n" says to stop reading the data after record  number  n.   Initially
  498. defaults to "/LASTOBS=2000000000" (2 billion).
  499.  
  500. "/-VER" is used when the  program  verifies  your  input  file  and  mistakenly
  501. determines that it is a file type  other  than  what  it  is.   This  sometimes
  502. happens with fixed-field input files even when /FROM FIXED is specified.
  503.  
  504. "/NULLS" allows fields that begin with decimal 0 to be left in the output  file
  505. as valid values.  Otherwise, they're  treated  as  being  missing.   /NULLS  is
  506. initially the default.
  507.  
  508. "/-NULLS" translates any field  which  begins  with  the  decimal  0  value  as
  509. missing.  For character fields,  it's  translated  to  the  value  of  INMISSC,
  510. numeric fields are switched to the  INMISS  value.   /NULLS  is  initially  the
  511. default.
  512.  
  513.  
  514. CONVERT.DOC                            11                          Apr 28, 1997
  515.  
  516. "/BINARY" says that you have a fixed-field input file  and  that  the  physical
  517. records in this file do not end with the normal  CR/LF  combination.   This  is
  518. fairly typical of files created on a mainframe  or  copied  from  a  tape.   If
  519. /BINARY  is  used,  every  byte  must  be  precisely  accounted  for.   /BINARY
  520. automatically invokes the /FROM FIXED option.
  521.  
  522. "/-BINARY" says that every record ends  with  a  CR/LF  combination.   This  is
  523. fairly standard on files  created  on  a  PC,  even  fixed-field  files.   When
  524. /-BINARY is in effect, trailing fields are ignored.   "/-BINARY"  is  initially
  525. the default.
  526.  
  527. "/SCAN=n" says to read the first n-records  when  determining  the  input  file
  528. characteristics.  This is only relevant for /FROM ASCII  files  which  use  the
  529. /-INDEF option.  The field types are based on the first  record  read  but  the
  530. maximum field widths are determined by reading the first n-records.   Initially
  531. defaults to "/SCAN=100".
  532.  
  533. "/GAP=n" specifies to add n-characters to each output  field  width.   This  is
  534. only relevant for /TO FIXED fields which use the /-INDEF option.  In this case,
  535. n-characters are added to each output field length for non-numeric  fields  and
  536. extra blank fields are added before every numeric field.  This is an  easy  way
  537. of splitting up columns on display.  If you  want  non-uniform  gaps,  you  can
  538. always process the file twice; specify /-INDEF with  /OUTDEF  the  first  time,
  539. modify the field-definition file by hand, and  then  reprocess  the  file  with
  540. /INDEF=filename.  Initially defaults to "/GAP=0".
  541.  
  542. "/CFILTERS" says that if cell filters are  specified  in  the  field-definition
  543. file (for example, "N 3 Age || > 5"), these cell filters are to  be  respected.
  544. This is initially  the  default.   (If  cell  filters  do  not  appear  in  the
  545. field-definition file at all, the switch is ignored.)
  546.  
  547. "/-CFILTERS" says that if cell filters are specified  in  the  field-definition
  548. file, they are to be ignored.  This is useful sometimes if you want  the  whole
  549. file instead of just getting a subset of it.  Note that this switch  will  also
  550. turn off initializing new fields (as in "N 0 0 3 Age || = 12").
  551.  
  552. "/Q" turns off the record-by-record status report.
  553.  
  554. "/Qn" shows a status message every n-number of records.  The default is "/Q25".
  555.  
  556. "/MONO" (or "/-COLOR") does not  try  to  override  screen  colors.   Initially
  557. defaults to "/COLOR".
  558.  
  559. "/COLOR" (or  "/-MONO")  allows  screen  colors  to  be  overridden.   This  is
  560. initially the default.
  561.  
  562. "/Iinitfile" says to read an initialization file with the file name "initfile".
  563. The file specification *must* contain a period.  Initfiles are described in the
  564. BRUCEINI.DOC file.  Initially defaults to "/ICONVERT.INI".
  565.  
  566. "/-I" (or "/INULL") says to skip loading the initialization file.
  567.  
  568.  
  569. CONVERT.DOC                            12                          Apr 28, 1997
  570.  
  571. "/ENV" says to look for %var% occurrences  in  the  command  line  and  try  to
  572. resolve any apparent environmental variable references.  See  BRUCEINI.DOC  for
  573. more information.  This is initially the default.
  574.  
  575. "/-ENV" says to skip resolving apparent %var% occurrences in the command  line.
  576. Initially defaults to "/ENV".
  577.  
  578. "/?" or "/HELP" or "HELP" shows you the syntax for the command.
  579.  
  580. "/?&H" gives you a hexadecimal and decimal conversion table.
  581.  
  582.  
  583. Return codes:
  584.  
  585. CONVERT returns the following ERRORLEVEL codes:
  586.         0 = no problems, file converted
  587.       250 = operation aborted by pressing Escape
  588.       251 = other problems
  589.       252 = problems with input data and /ABORT specified
  590.       253 = problems with INDEF or OUTDEF file
  591.       254 = could not find a decent temporary output subdirectory
  592.       255 = syntax problems, file(s) not found, output file already exists,
  593.             /? requested
  594.  
  595.  
  596.  
  597. CONVERT.DOC                            13                          Apr 28, 1997
  598.  
  599. Restrictions and Caveats:
  600.  
  601.   * The program skips all Memo fields in dBase files on input.
  602.  
  603.   * Most spreadsheet programs restrict a given field length to being 240
  604.     characters or less.
  605.  
  606.   * Date fields which are in the form "yy-mm-dd" (instead of "yyyymmdd") should
  607.     be declared as character fields instead of date fields.
  608.  
  609.   * Date fields converted for WKS files are changed into strings of the
  610.     "yy-mm-dd" format.
  611.  
  612.   * Some users have reported problems using this program when their default
  613.     drive is a network drive instead of a local hard drive.  If you get a
  614.     "path/file access error", make C: your default drive and try again.
  615.  
  616.  
  617. Author:
  618.  
  619.                         Bruce Guthrie
  620.                         Room H-4885
  621.                         U.S. Dept of Commerce/ESA/STAT-USA
  622.                         Washington, DC 20230
  623.  
  624.                         voice: (202) 482-3234
  625.                         e-mail: bguthrie@doc.gov
  626.  
  627. You  may  freely  copy  and  re-distribute  this  program;  however,  the  U.S.
  628. Department of Commerce neither guarantees  nor  assures  compatibility  of  the
  629. program with all computer software or hardware.
  630.  
  631. Additional information about this and other Bruce Guthrie programs can be found
  632. in the file BRUCE.DOC which should be included in the original ZIP  file.   The
  633. recent change history for this and  the  other  programs  is  provided  in  the
  634. HISTORY.ymm file which should be in the same ZIP file where "y" is replaced  by
  635. the last digit of the year and "mm" is the two  digit  month  of  the  release;
  636. HISTORY.611 came out in November 1996.  This same naming convention is used  in
  637. naming the ZIP file (CONVRymm.ZIP) that this program was included in.
  638.  
  639. Please provide an Internet e-mail address on all correspondence.
  640.  
  641. 
  642.